<div class="container">
    <div *ngIf="!isLogin" class= "fl rightgap">
        <a (click)="showWin()">登录</a>
    </div>
    <div *ngIf="isLogin" class= "fl rightgap" style="margin-top: 2px;">
        <a class="admin" (click)="showoptions()">{{loginUserName | slice:0:1 | uppercase}}</a>
    </div>
    <div [@firstLayer]="boxState2" class= "dropdown2"><a (click)="logout()">注销</a></div>
    <div [@secondLayer]="boxState3" class= "dropdown3"><a routerLink="/adminmanager" routerLinkActive="router-link-active" >后台管理</a></div>
    <!-- <a href="https://gitee.com/buaarobot/" target="gitee" class="git-coin"><i class="fa fa-github fa-2x" aria-hidden="true"></i></a> -->
</div>

<div class="login_window"> 
  <p-dialog [(visible)]="display" modal="true" dismissableMask="true" (onHide)="onHide()">
    <div class="inputbox">
      <div class="ui-inputgroup">
        <span class="ui-inputgroup-addon"><i class="fa fa-user " style="line-height: 1.5;"></i></span>
        <input type="text" [(ngModel)]="username" pInputText placeholder="Username" style="width: 150px;">         
      </div>
      <div class="ui-inputgroup">
        <span class="ui-inputgroup-addon"><i class="fa fa-key " style="line-height: 1.5;"></i></span>
        <input type="password"  pPassword [(ngModel)]="password" placeholder="Password" style="width: 150px;">
      </div>
      <div class="text" style="color: red;">
        <br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        {{ text }}
      </div>
      <button (click)="login()">
        <span class="ui-inputgroup-addon"><i class="fa fa-sign-in" aria-hidden="true"></i></span>
        &nbsp;&nbsp;登录
      </button>
    </div>
  </p-dialog>
</div>